<%@taglib uri="/struts-tags" prefix="s" %>

<% if (request.isUserInRole("ADMIN")) { %>
<div id="sidebar">
	<ul>		
		<li>
			<h2>Player details</h2>
			<ul>
				<s:url id="history" namespace="/user" action=""/>
			    <li><s:a href="%{history}">Player history </s:a></li>
					
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Edit player attributes</s:a></li>
					
				<s:url id="passwd" namespace="/user" action=""/>
			    <li><s:a href="%{passwd}">Change password</s:a></li>
				
				<s:url id="winLoss" namespace="/user" action=""/>
			    <li><s:a href="%{winLoss}">Win/loss results</s:a></li>
			</ul>
		</li>
	</ul>	
</div>
<div id="sidebar">
	<ul>		
		<li>
			<h2>League membership</h2>
			<ul>
				<s:url id="myLeagues" namespace="/league" action=""/>
			    <li><s:a href="%{myLeagues}">My Leagues</s:a></li>
			
				<s:url id="createUser" namespace="/user" action="input"/>
			    <li><s:a href="%{createUser}">Create User</s:a></li>
			
				<s:url id="addMember" namespace="/league" action="inputAddMember"/>
			    <li><s:a href="%{addMember}">Add user as league member</s:a></li>
					
				<s:url id="removeMember" namespace="/league" action="inputRemoveMember"/>
			    <li><s:a href="%{removeMember}">Remove Member from League</s:a></li>
					
				<s:url id="listMembers" namespace="/league" action="selectLeague"/>
			    <li><s:a href="%{listMembers}">List all League Members</s:a></li>
			</ul>
			
		</li>
	</ul>	
</div>			
<div id="sidebar">
	<ul>		
		<li>

			<h2>League maintenance</h2>
			<ul>
				<s:url id="create" namespace="/league" action="input"/>
			    <li><s:a href="%{create}">Create league</s:a></li>
			
				<s:url id="edit" namespace="/league" action="input"/>
			    <li><s:a href="%{edit}">Change league attributes</s:a></li>
					
				<s:url id="operator" namespace="/league" action=""/>
			    <li><s:a href="%{operator}">Add/remove league operators</s:a></li>
					
				<s:url id="season" namespace="/league" action=""/>
			    <li><s:a href="%{season}">Examine all league seasons</s:a></li>
				
				<s:url id="createSeason" namespace="/league" action=""/>
			    <li><s:a href="%{createSeason}">Create league season</s:a></li>
			    
			    <s:url id="addMatch" namespace="/league" action="inputAddMatch"/>
			    <li><s:a href="%{addMatch}">Add match result</s:a></li>
			    
				<s:url id="chSeason" namespace="/league" action=""/>
			    <li><s:a href="%{chSeason}">Change league season attributes</s:a></li>
					
				<s:url id="removeSeason" namespace="/league" action=""/>
			    <li><s:a href="%{removeSeason}">Delete league seasons</s:a></li>
					
				<s:url id="expStandings" namespace="/league" action="inputDefineStandingExpression"/>
			    <li><s:a href="%{expStandings}">Edit expression to calculate standings</s:a></li>
				
				<s:url id="expHandicap" namespace="/league" action=""/>
			    <li><s:a href="%{expHandicap}">Edit expression to calculate delta handicap</s:a></li>			    

				<s:url id="fileMatchup" namespace="/league" action=""/>
			    <li><s:a href="%{fileMatchup}">Edit matchup tables </s:a></li>
					
				<s:url id="chSecurity" namespace="/league" action=""/>
			    <li><s:a href="%{chSecurity}">Edit security details</s:a></li>
				
				<s:url id="exportData" namespace="/league" action=""/>
			    <li><s:a href="%{exportData}">Export league data</s:a></li>			    

			</ul>
			
		</li>
	</ul>	
</div>
<% } %>


<% if (request.isUserInRole("OPERATOR")) { %>
<div id="sidebar">
	<ul>		
		<li>
			<h2>Player details</h2>
			<ul>
				<s:url id="edit" namespace="/user" action="edit"/>
			    <li><s:a href="%{edit}">Edit profile</s:a></li>
					
				<s:url id="passwd" namespace="/user" action=""/>
			    <li><s:a href="%{passwd}">Change password</s:a></li>
									
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Win/loss results</s:a></li>
			</ul>
		</li>
	</ul>	
</div>
<div id="sidebar">
	<ul>		
		<li>
			<h2>League membership</h2>
			<ul>
				<s:url id="myLeagues" namespace="/league" action=""/>
			    <li><s:a href="%{myLeagues}">My Leagues</s:a></li>
					
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 2</s:a></li>
					
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 3</s:a></li>
				
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 4</s:a></li>
			</ul>
		</li>
	</ul>	
</div>
<% } %>


<% if (request.isUserInRole("PLAYER")) { %>
<div id="sidebar">
	<ul>		
		<li>
			<h2>Player details</h2>
			<ul>
				<s:url id="edit" namespace="/userPlayer" action="edit"/>
			    <li><s:a href="%{edit}">Edit profile</s:a></li>
					
				<s:url id="passwd" namespace="/user" action=""/>
			    <li><s:a href="%{passwd}">Change password</s:a></li>
				
				<s:url id="winLoss" namespace="/user" action=""/>
			    <li><s:a href="%{winLoss}">Win/loss results</s:a></li>
			</ul>
		</li>
	</ul>	
</div>
<div id="sidebar">
	<ul>		
		<li>
			<h2>League membership</h2>
			<ul>
				<s:url id="myLeagues" namespace="/league" action=""/>
			    <li><s:a href="%{myLeagues}">My Leagues</s:a></li>
					
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 2</s:a></li>
					
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 3</s:a></li>
				
				<s:url id="list" namespace="/user" action="listAll"/>
			    <li><s:a href="%{list}">Action 4</s:a></li>
			</ul>
		</li>
	</ul>	
</div>
<% } %>